package be.cgi.heroesmanager.db;

import android.content.Context;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class HeroesHelper extends SQLiteOpenHelper {
	
	String CREATE_REQUEST = 
			"CREATE TABLE " + HeroesAdapter.TABLE_HEROES + " (" +
				HeroesAdapter.COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
				HeroesAdapter.COLUMN_NAME + " TEXT NOT NULL," +
				HeroesAdapter.COLUMN_CITY + " TEXT," +
				HeroesAdapter.COLUMN_ABILITY + " TEXT" +
			");";

	public HeroesHelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(CREATE_REQUEST);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	}
}
